package com.lagou.pojo;

import com.lagou.sqlSession.ParameterHandler;
import com.lagou.sqlSession.ResultSetHandler;
import com.lagou.sqlSession.TypeHandler;

import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;

public class Configuration {

    /*
     *   key: statementid  value:封装好的mappedStatement对象
     * */
    Map<String, MappedStatement> mappedStatementMap = new HashMap<>();
    private DataSource dataSource;
    private ParameterHandler parameterHandler;
    private TypeHandler typeHandler;
    private ResultSetHandler resultSetHandler;

    public ResultSetHandler getResultSetHandler() {
        return resultSetHandler;
    }

    public void setResultSetHandler(ResultSetHandler resultSetHandler) {
        this.resultSetHandler = resultSetHandler;
    }

    public TypeHandler getTypeHandler() {
        return typeHandler;
    }

    public void setTypeHandler(TypeHandler typeHandler) {
        this.typeHandler = typeHandler;
    }

    public ParameterHandler getParameterHandler() {
        return parameterHandler;
    }

    public void setParameterHandler(ParameterHandler parameterHandler) {
        this.parameterHandler = parameterHandler;
    }

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }

    public Map<String, MappedStatement> getMappedStatementMap() {
        return mappedStatementMap;
    }

    public void setMappedStatementMap(Map<String, MappedStatement> mappedStatementMap) {
        this.mappedStatementMap = mappedStatementMap;
    }
}
